import React, { Component } from 'react'
import { ThemeContext, UserContext } from "../Context";
export default class ContextTypePage extends Component {
    //局限性所在，只能用一个contextType  后面的会覆盖前面的
    static contextType = ThemeContext
    // static contextType = UserContext
    render() {
        console.log(`this.context`, this.context)
        const { themeColor, name } = this.context
        return (
            <div>
                <div className="border">
                    <h3 className={themeColor}>ContextTypePage</h3>
                </div>
            </div>
        )
    }
}
